package com.hy.${packageCode}.common.api.vo;


import com.hy.${packageCode}.common.model.NamedDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.*;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class NamedVO extends AbstractVO {

    @Size(min = 1,max = 128)
    @Schema(description = "名称")
    private String name;

    public NamedVO(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public NamedDTO to(){
        return new NamedDTO(id,name);
    }

}
